FROM anapsix/alpine-java:8_server-jre_unlimited

MAINTAINER 475238043@qq.com

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms4096m -Xmx4096m -Djava.security.egd=file:/dev/./urandom -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/CloudDisk/Disk/heapdump.hprof"

RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN mkdir -p /CloudDisk/Disk/   &&  mkdir -p /data/CloudDisk/log/
WORKDIR /CloudDisk

EXPOSE 9098

ADD ./target/spring-boot-CloudDisk.jar ./spring-boot-CloudDisk.jar

CMD sleep 3;java $JAVA_OPTS -jar spring-boot-CloudDisk.jar
